package com.juyu.miliao.api.dao.mysql;

import com.juyu.miliao.common.domain.BillDetailIntegral;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author xuanqicheng
 */
@Repository
public class BillDetailIntegralDao {
    @Autowired
    private SqlSession sqlSession;

    public List<BillDetailIntegral> getBillDetailIntegralByUserId(long userId,
                                                                  int startNum, Integer pageSize) {
        Map<String, Object> params = new HashMap<>();
        params.put("userId", userId);
        params.put("startNum", startNum);
        params.put("pageSize", pageSize);
        return sqlSession.selectList("getBillDetailIntegralByUserId",params);
    }
}
